import request from '@/utils/request'

export function getDeptTree() {
    return request({
        url: '/dept/getDeptTree',
        method: 'get',
    })
}

export function getDeptUser(page,deptId) {
    return request({
        url: '/dept/getDeptUser/'+deptId+'/'+page.pageNo+'/'+page.pageSize,
        method: 'get',
    })
}

export function updateDept(data) {
    return request({
        url: '/dept/updateDept',
        method: 'put',
        data
    })
}

export function saveDept(data) {
    return request({
        url: '/dept/saveDept',
        method: 'post',
        data
    })
}

export function deleteDept(id) {
    return request({
        url: '/dept/deleteDept/'+id,
        method: 'delete',
    })
}


